var app = angular.module('myApp', []);
app.controller('ctrl', function($scope, $http) {
	$scope.search = function() {
		console.log($scope.id)
		$http({
			url : context + '/demo/ajax',
			data : {
				type : $scope.id
			},
			method : 'post'
		}).success(function(data) {
			console.log('data', data);
			$scope.users = data;
		})
	}
	$scope.agg = function() {
		$http({
			url : context + '/demo/agg',
			method : 'post'
		}).success(function(data) {
			console.log('data', data);
			$scope.aggage = data;
		})
	}
});